package com.main.service.impl;

import com.main.dao.UserDao;
import com.main.entity.User;
import com.main.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lyl
 * @version 1.0
 * @date 2019/5/21
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public List<User> getUserList() {
        return userDao.getuserList();
    }

    @Override
    public int register(User user) {
        return userDao.register(user);
    }

    @Override
    public User select(Long id) {
        return userDao.select(id);
    }

    @Override
    public Boolean login(String username, String password) {
        return userDao.login(username, password);
    }

    @Override
    public int update(User user) {
        return userDao.update(user);
    }

    @Override
    public int delete(Long id) {
        return userDao.delete(id);
    }

    @Override
    public Boolean webLogin(String email, String password) {
        return userDao.webLogin(email, password);
    }
}
